﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Web.Pages;
using FutureOpen.Core;
using FutureOpen.Core.func;
using FutureOpen.Core.func.db;
using FutureOpen.Core.func.sql;
using System.Text;

public partial class GroupView : PageBase
{
    public int oid;
    
    protected void Page_Load(object sender, EventArgs e)
    {
        base.PageInit();
        oid = orgid;
       
        if (!IsPostBack)
        {              
            if (orgid > 0)
            {
                /*
                AspNetPager1.RecordCount = TopicProvider.GetTopicCountByGroup(orgid);
                BindArts(0, 30);
                */
            }
            
        }

    }
    /*
     private void BindArts(int start, int end)
    {
        DataSet ds = TopicProvider.GetTopicByGroup(oid, start, end);
        StringBuilder sb = new StringBuilder();

         foreach(DataRow dr in ds.Tables[0].Rows)
         {
             sb.Append("<tr>");
             sb.Append("<td class='title' style='height: 21px'>"+dr["topic_title"].ToString()+"</td>");
             sb.Append("<td style='height: 21px'>"+dr["topic_usr"].ToString()+"</td>");
             sb.Append("<td style='height: 21px'>"+dr["topic_reply_count"].ToString()+"</td>");
             sb.Append("<td style='width: 132px; height: 21px;'>" + dr["topic_last_modify_time"].ToString() +"</td>");
             sb.Append("</tr>");
         }
         ltTopics.Text = sb.ToString();	        
    }

    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        BindArts(30 * (e.NewPageIndex - 1), 30);
    }
    */
    protected void btnNew_Click(object sender, EventArgs e)
    {
        string url = "GroupAdd.aspx?orgid=" + this.orgid;
        Response.Redirect(url);
    }  
    protected void btnFrontPage_Click(object sender, EventArgs e)
    {
        string url = "GroupView.aspx?orgid=" + this.orgid;
        Response.Redirect(url);
    }
    protected void Button1_ServerClick(object sender, EventArgs e)
    {
        string url = "GroupArtNew.aspx?orgid=" + this.orgid;
        Response.Redirect(url);
    }
}
